1. Field of the Invention
The present invention relates to a position detecting apparatus which obtains images of one object with a plurality of imaging units for detecting the position in an actual space of the object, and a method of correcting data in the position detecting apparatus.
2. Description of the Related Art
There has been developed a vehicle vicinity monitoring apparatus for obtaining images of one object with two imaging units mounted on a vehicle, for example, either measuring the distance up to the object based on the parallax between the obtained images, or measuring the position in an actual space of the object with respect to the vehicle, and informing the driver of whether there is an obstacle ahead of the vehicle or not (see Japanese Laid-Open Patent Publication No. 2003-216937).
In this invention, a distance Z from the imaging units to the object can be calculated by an equation (1) below using an ideal perspective transformation model in which the optical axes of the imaging units are parallel to each other, where f is a focal length of each of the imaging units, p is a pixel pitch of the images obtained by the imaging units, B is a base length between the imaging units, and dn is a parallax between the object images obtained by the imaging units.Z=f/p·B/dn  (1)
When the optical axes of the imaging units are not parallel to each other, i.e., a relative pan angle between the imaging units is not zero, an error is included in the parallax based on the relative pan angle. Thus, the distance Z cannot be accurately measured based on the parallax. To avoid this defect, it is conceivable that the optical axes of the imaging units are adjusted to be parallel to each other. However, an adjustment apparatus is required for adjusting the optical axes, and it may cost much undesirably.
Meanwhile, another method is also proposed as follows. It is assumed that the focal length f of each of the imaging units, the pixel pitch p and the base length B are measured easily. An object away from imaging units by the distance Z is imaged by the imaging units, and the parallax including an error is calculated from the two obtained object images. The difference between a theoretical parallax dn obtained from the equation (1) with reference to the difference Z and an actual parallax including the error obtained from the images is obtained. The difference is set as a parallax corrective value. In this case, the distance to the object can be calculated by correcting the parallax even if a relative pan angle is not zero, without any particular adjustment apparatus for adjusting optical axes.
In the above-mentioned method of calculating the parallax corrective value, however, the parallax corrective value cannot be calculated highly accurately if the distance Z at which the object is positioned is not so large, for the relative pan angle considerably affects the parallax. Accordingly, a large measuring space is needed for calculating the desirable parallax corrective value.